package com.graduation.smartparkingplatform.Dao;

import com.graduation.smartparkingplatform.Pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SpaceMapper {
  public List<SpaceAll> getSpaceLists();

  public List<Space> getSpaceList();

  public List<SpaceAll> getSpacePublicLists();

  public Private getPrivateInfo(@Param("spaceId") Integer spaceId);

  public List<Space> searchSpace(
      @Param("spaceNo") String spaceNo, @Param("carPlate") String carPlate);

  public Boolean addSpace(SpaceNA spaceNA);

  public Boolean addRegionSpace(
      @Param("spaceID") Integer spaceID, @Param("regionId") Integer regionId);

  public Boolean changeInfo(SpaceNA spaceNA);

  public Boolean changeRegionSpace(
      @Param("spaceID") Integer spaceID, @Param("regionId") Integer regionId);

  public Boolean changeSpaceStatus(
      @Param("spaceId") Integer spaceId, @Param("status") Boolean status);

  public Boolean deleteSpace(@Param("spaceId") Integer spaceId);

  public Boolean deleteRegionSpace(@Param("spaceId") Integer spaceId);

  public Boolean addCar(@Param("spaceId") Integer spaceId, @Param("carPlate") String carPlate);

  public Boolean isPrivateSpaceId(@Param("spaceId") Integer spaceId);

  public List<Space> noPrivateSpace();

  public List<Space> searchNoPrivateSpace(@Param("spaceNo") String spaceNo);

  public Boolean deleteCharge(@Param("spaceId") Integer spaceId);

  public Charge getCharge(@Param("spaceId") Integer spaceId);

  public Boolean bindCharge(@Param("spaceId") Integer spaceId, @Param("chargeId") Integer chargeId);
}
